This document is admittedly one of the most poorly written things I've ever seen, but I wanted to get the stack posted as soon as possible, so that I could start getting feedback and ideas from all you hyper-heads out there, or at least get the hint that it isn't worth doing anything fancier for. Please forgive its brevity and disorganization - if I get enough encouragement, and as soon as I get the time to make any improvements that are suggested, I will post an improved version with better docs.
Introduction
How many of you, like me, were very impressed with PowerStation, the very nifty “mini-finder” application by Steve Brecher? How many of you were also very impressed with the capabilities offered by HyperCard for developing your own minifinder-like programs? How many of you wished you had the best of both worlds in one package? Well, even if none of you did, I did! I wanted to be able to continue to use the minifinder features that PowerStation offers, to be able to customize it to add those things that had accumulated on my PowerStation wish-list, and to be able to quickly add any new functions that may pop up in the future. HyperCard's incredibly powerful, high-level language and development environment struck me as the perfect means to implement an application like PowerStation in this way. HyperStation is the result.
If you know how to use PowerStation, you have the basics on how the HyperStation stack operates. You have a window with ten rows and four columns of buttons that can be assigned to your favorite applications and documents. Rather than dig through all the subdirectories on your hard disk to find these files, simply click the button and let Hypercard dig it up for you!
There are some big differences between PowerStation and HyperStation, however. First, you are not limited to only ten screens-full of buttons. HyperStation will allow you to create as many of these screens as you want. Second, HyperStation lets you access these screens from the same buttons as the document and application files. What this does is allow pages to be "nested" within other pages, arranging them in a hierarchical relationship just like disk subdirectory folders are related by the Finder. Because of this similarity, HyperStation refers to the buttons used to access these nested cards as "folder" buttons.
Like PowerStation, you can install any of your applications, documents or desk accessories as buttons. It's not hard to guess that a HyperCard mini-finder will also allow you to install stacks as buttons as well. You can also install "note" buttons that will create a text field that will pop up whenever the button is clicked, so that you can store and retrieve notes related to a specific topic. You can have as many of these notes on a card as you wish. Finally, you can also install special-function buttons with scripts that you write, to do whatever else you want to do (and are able to program in HyperTalk).
HyperStation also has a built-in "sleep" function - if you don't move your mouse for more than 2 minutes, your screen will go blank, the cursor will disappear, and a little eyeball icon will dance around the screen. Move the mouse and you'll return to where you were when you went to sleep. This function will work from any stack, as long as you have renamed HyperStation to be your "Home" stack, and the stack you are in passes idle events.
Installing HyperStation
The best way to install HyperStation is to copy it to your hard disk (if you don't have a hard disk, go buy one... without one, your Mac is barely worth more than a boat anchor!), trash that silly Home stack that came with the HyperCard package, and then rename HyperStation to be your new "Home" stack. Then use the Finder's Special menu to define HyperCard as your startup application. That's all there is to it!
...Well, not really. Before trashing your original Home stack, you'll want to at least save a copy on diskette first, of course - you wouldn't do something that drastic on the word of a total stranger without making sure you can back out, right? You may have installed some special scripts, icons, or external routine resources in this stack since you got it, and will want to take steps to make sure they can be transferred to the HyperStation stack (if you knew how to install them in the first place, I can assume you'll be able to figure out how to transfer them as well).
As an alternative, you can install a button somewhere on your current Home stack that will link you to the HyperStation stack, but this will diminish the utility of the thing greatly.
One piece of advice I will give you whether you decide to use HyperStation or not: buy a copy of the latest version of either DiskTop (CE Software) or DiskTools II (Battaries Included), desk accessories that enable you to do all the disk-management functions that the Finder allows, and then some. I've played with both of these excellent products, and ended up buying DiskTools II simply because I liked the way it “looked”, but regardless what your purchase criteria is, either of them will end up making your life a whole lot easier by enabling you copy, rename, delete, & move files & folders on your disk, make new folders, and launch applications & documents from any application without ever using the Finder. Its a “must” for working with an application like HyperCard. Since I got this DA & started using HyperStation, I could easily delete the Finder from my disk without ever missing it.
Organizing your hard disk
Because of the way HyperStation tries to help you locate files on your disk, it uses a different path-memory technique than the original Home card uses with its "Look for Applications/Documents In..." cards. First, it keeps track of where applications have been selected so that it can take you back to that same path whenever you try to select another application. Second, it keeps track of where documents have been selected for each folder card, so that it can take you back to the same path the next time you try to select a document from that card.
With this in mind, it may be helpful to plan ahead and organize your hard disk so that you can minimize your effort by taking advantage of these HyperStation traits. This is all very optional - HyperStation will work very well no matter how your hard disk is (or isn't) organized, but by following these suggestions, HyperStation can make your common tasks of looking for files and applications much easier. I designed HyperStation's "habits" to conform to the way I had my hard disk organized before I started using any mini-finder, and my hard disk was organized like about a hundred or so others I have seen, so I recommend you consider these tips whether you end up using HyperStation or not.
The first thing you should do is set up a single folder for holding your applications. Simple, right? Since HyperStation will remember where you select applications from, and return you to the same path the next time you look for an application, keeping all the applications in one spot will definitely speed your searches for applications. Those applications that are likely to be searched for repeatedly, because they are of general use or are used with the types of documents you usually create for most of your applications, should all be kept in a centralized folder. I have a single folder at the root level of my hard disk named "Applications", and this is where most of my applications are stored.
You probably already have folders on your hard disk that were created to hold documents related to general project topics, such as “Pascal Programming,” “Desktop Publishing,” or “Magazine Articles.” Within each of these general topic folders, you probably have more specific project folders, like “Graphics Routines,” “Marketing Brochure,” or “HyperCard Review.” If so, then leave these folders alone. If not, think about re-organizing the folders you do have so that they conform to this sort of order.
Finally, you may want to create a folder at the root level that will hold all those documents that you will probably want access to all the time, like your address file, your graphics templates, your letterhead stationary, etc. If you don't have too many of these types of documents, it may be advantageous to keep them in the same folder as your applications.
Installing Buttons on your Home card
When you first start up the HyperStation stack, you will see three distinct areas of the screen: across the top is a black area with two rows of grey square buttons; beneath this is a menu bar (I know, its not Mac Standard, but nothing I've seen done in HyperCard is! Bill Atkinson, genius that he is, has always bucked the interface guidelines - where were the scroll bars in MacPaint? HyperCard needs a lot of changes if its going to promote development of applications that adhere to the Apple gospel); Finally, there is a large grey area with ten rows of the same grey buttons. All of these grey squares are buttons waiting for you to install something into them.
To install something into a button, simply point at it with the mouse and press the button down (keep the button down for a few seconds - this is an interpreted language, and I never said this thing was very fast!) and select one of the "Add…" commands from the menu that pops up.
Adding an Application Button
If you select "Add Application…", HyperStation will present you with the standard file selection dialog, and ask you to select the application you want to add to the button. If you select one and click Open, The button's label will appear with the name of the application, and you may now open that aplication by clicking on the button label.
Adding a Document Button
Selecting "Add a Document…" from the pop-up menu will enable you to select first an application, then a document for that application. The document's name will appear in the button label, and clicking this label will open the document using the selected application. One note of concern here: the standard file selection dialog presented to allow you to select the document will show ALL files, not just those that the application you selected can handle. As soon as I, or more likely, someone who knows what they're doing, figures out how to identify the file-types usable by a given application, I will fix this. For now, however, you'll have to keep in mind what documents go with what applications, and match them up accordingly.
If you hold down the option key when you pull down the button menu, this menu item changes to read "Install Resume Document…". This is a special function intended for use with the "Resume…" documents created by applications like Excel & More. You can use this option to create special buttons that will launch groups of documents for these applications. For example, say you have a pair of worksheets and a macro sheet that you always use to plan and record your finances with. You want a single button that will open Excel and all three of these documents - follow these steps:
1. Open Excel, and use the Open menu to open all three files.
2. Arrange the windows to the way you want them arranged every time.
3. Without closing any of the windows, select "Quit" from the file menu.
If Excel asks you to save first, feel free to do so if necessary.
4. Back in HyperStation, hold down the option key and pull down the menu
for the button you want to use for these documents. Select the "Add
"Resume" Document…" menu item.
5. In the first file selection dialog, select the Excel application.
6. In the second selection dialog, select the document named "Resume Excel"
(Its usually in the System Folder).
7. In the standard "Save As" dialog that follows, go to the folder that you
want to save your special "Resume" document in (usually the same as the
worksheets you are working with), and give the document a name, something
like "Finance Worksheets", or "Resume Finances".
HyperStation will give the name you gave to the document in the Save As dialog to the button it creates in that place. Now, every time you click on the label of the button, HyperStation will open the Excel application with the Resume document you created, causing it to reopen all the documents you want and position them in the same arrangement they held when you quit Excel. You can do your work, add new documents to the set simply be opening them, remove windows from the set by closing them, and rearrange the windows to your hearts content.
When you quit, Excel will save the new set of documents and window arrangement into a new copy of Resume Excel, and HyperStation will recopy the Resume Excel document over your "Finance Worksheets" (or whatever), keeping this document up to date with your current desires.
Adding a Stack Button
Of course, what would a HyperCard miniFinder be like if you couldn't add buttons to open stacks with. Select the "Add a Stack…" item from the menu of the button you want to use to jump to a particular stack, and find that stack in the selection dialog. The button's label will appear with the name of the stack, and you need only click on this label to jump to that stack.
Adding a Desk Accessory Button
Pull down the menu for a button that you want to use to open a desk accessory, and HyperStation will ask you to supply the name of this desk accessory. Actually, it asks for the EXACT name of the desk accessory, because it is very important that you type the name exactly as it appears in the "apple" menu. This includes using any leading or trailing blanks, special characters such as the little trade-mark symbols that are almost always used by publishers of commercial software in d/a form. You may want to temporarily activate the standard HyperCard menu bar by typing Cmd-Spacebar, and verifying the spelling of the d/a in the "apple" menu before trying this.
Adding a “Folder” Button
Here's where things start to get useful. Anyone who can fit all the buttons they want to use on the Home card of this stack should seriously reconsider the validity of their original decision to buy the Mac. Everyone else is going to want to add new pages to hold the several hundred other buttons they will need. Simply pull down the menu for a button and select "Add Folder…", respond to the prompt for a name with whatever label you wish the button & associated card to have, and HyperStation will create a new card full of blank buttons, ready for you to use as you see fit.
The nice thing about these folder buttons is that they can be installed on cards accessed from other folder buttons; they can be nested within each other to an infinite level, thereby giving you complete flexibility in organizing all the documents you have on your hard disk.
When you click on a folder button and open its card, a new menu appears on the menu bar, containing the elements of the folder's "path", or the list of cards that one has to traverse through to get between the current card and the "home" card. Selecting a card name from this list allows you to jump straight to that card without seeing all the intermediate cards. If all you want to do is close the current card and go straight to its immediate parent, just click on the card's name in the title area of the menu bar. Holding down the command-key and clicking on the card's name in the title area will close all folder cards and go straight to the home card.
Adding a Note Button
Note buttons are used to create a scrolling text field that you can call up on demand to use to store lists, phone messages, memos, or whatever you want. You can have as many note buttons on a given card as you want, and each will have its own text field. As usual, you pull down the menu for a button you want to install as a note button, and select "Add Note…". HyperStation will ask you for a name to use to label the note, you type it in, and you have a note button.
When you open the note field by clicking on the button label, a new menu will appear in the menu bar, entitled "Notes" with items that let you export the note's text to a disk file, and to close the note field. Alternatively, you can click the card's name in the title area of the menu bar to close the note field.
Adding a Special Function Button
I'm sure you all have a massive collection of button scripts that do all sorts of fancy things, and will want to integrate them into your HyperStation stack; the "Add Special…" command on the button menus will easily allow you to do just that. After you respond to the request for a name for the special-function button, HyperStation will put you into the Script Editor for that button's label, allowing you to write any script, or paste one in from the clipBoard.
The script editor will already have an "on mouseUp" script skeleton installed, that will make the button label behave the same as the standard function buttons:
on mouseUp
put the name of the target into selField
put word 1 of selField && "button"&& word 3 of selField into selButton
set the hilite of selButton to true
set the hilite of selButton to false
visual effect zoom open
-- Enter your special-function script below
end mouseUp
The comment on the seventh line tells you where to add the code for your special function. An example that can be used to invoke Steve Maller's ResCopy routine is shown below:
on mouseUp
put the name of the target into selField
put word 1 of selField && "button"&& word 3 of selField into selButton
set the hilite of selButton to true
set the hilite of selButton to false
visual effect zoom open
-- Enter your special-function script below
-- Invoke the ResCopy XFCN
ResCopy
hide menuBar
end mouseUp
It is very unlikely that you will get the script to function exactly the way you want on your first try, so you will probably want to edit it a few times before you are satisfied. If you simply pull down the button menu and select "Add Special…", however, HyperStation will think you want to replace the existing script with a new special function, and will replace it with a fresh copy of the skeleton, wiping out your scripting work done before. If you hold down the Option key when pulling down the menu, however, the "Add Special…" item will change to read "Edit Special…", and this command will enable you to edit the existing script as you left it last time.
Defining "Global" Buttons
The black area is for buttons that you want to appear on all your cards; they are "global" in nature, and should be used for those applications, docs, or whatever that you will want to use no matter what project or topic you have on your mind at a given moment. I advise you to wait until you've set up your home card and several folder-buttons with applications and such, to see which buttons you end up installing all over the place. Once you notice a pattern, copy the button that you want on every card and paste it into one of the black-area button slots.
Other Button Operations
After a button's function has been defined, you can (usually) perform other operations, such as cutting or copying a button into global variables from which the button can be repasted later. This is especially useful for special function buttons that you want to use on more than one card, after it has been debugged in its original location. You can also edit the name of the button - if the document or application that you install in a button has a rather wordy name, the last word may not be visible in the label; this function lets you edit the label, deleting unnecessary words or abbreviating so that the label is more legible, without the need to rename the file and reinstall it.
Limitations
There are a few limitations in this release of HyperStation that I haven't yet had time to resolve, but that I plan to as soon as they implement the eight-day week:
- You cannot copy folder buttons, you can only cut them, and once you cut them,
you can only paste them once. This is because I have not yet figured out how
to have more than one button pointing to a card and still maintain the paths
menu. The card structure was originally intended to be purely heirarchical,
and allowing more than one button to point to a card would enable a networked
structure. This may be desirable to some folks, so I'll figure it out.
- If you cut a folder button, and then do something that clears out the global
variables used as a "button clipboard", the access to that folder's card is
shot, but the card and any of its nested cards remain in the stack, taking up
space. You must remember to repaste the button immediately. Folder buttons
can be repasted on other cards.
- Note buttons can't be cut or copied at all. This button type was an
afterthought, and was therefore hastily implemented. If you want to move a
note, simply open it, copy its contents into the real clipboard, and then
repaste it into a new note button installed in the desired location.
- Note buttons can't be installed in the global button area.
- Folder buttons can be installed in the global button area, but when you open
a folder's card and then close it, it will return you to the card from which
it was created, not the card from which it was opened.
- This thing is SLOW! ...at least is is on my Mac+. I would be interested in
hearing from SE and II owners about how performance is on these machines, but
in any case, improving the speed is my first priority. I've done all I could
to make sure that the detailed code stays in the background & stack script
areas, so that writing an upgrade routine that will copy all cards from the
old version to the new version can be easily done. Interesting note: the
thing worked at a much more acceptable speed under version 1.0.1 of HyperCard
...switching to 1.0.3 really slowed it down.
Anyone with suggestions for improvements along these or any other lines, please let me hear from you!
Bob Pulgino
76174,3377
HyperStation's External Routines (Credit where credit is due)
HyperStation makes heavy use of several HyperCard external routines (XCMD's & XFCN's) I found in the public domain, and was possible only because the people who wrote these nifty little buggers did all the hard work for me. If it weren't for these people, HyperCard wouldn't be worth much at all (I still can't figure out why Apple didn't include most of these capabilities as part of HyperCard itself!). Therefore, credit must be given to the "real" programmers involved:
The standard-file package routines (XFCN's named FileName and NewFileName) came from Andrew Gilmartin of Brown University, who rewrote and enhanced the original FileName from Steve Maller of Apple Computer.
- The menu routine (XFCN named PopupMenu) also comes from Andrew Gilmartin.
- The file and path utility routines (XFCN's RenameFile, DeleteFile,
FileModDate, & MoveFile, and XCMD StdFile) come from Dewi Williams.
- The final touch came from Will Cate in the form of the ShutDown XCMD.
If you want to thank anybody for the work presented here, thank these guys, because like I said, they did the hard part. (And of course, Steve Brecher deserves all the credit for the original PowerStation concept.)
These external routines should be a part of every HyperTalk programmer's library, along with a few others that are equally great in utility and quality, such as the menu management routines from Michael Long of Nine to Five Software, and the DoList routine from James L. Paul, which allows you to create scrollable selection-list dialogs. All of these routines are available from CompuServe, most other commercial & public bulletin boards, and any self-respecting Mac users' group, in their own stacks that include very complete documentation and examples for use. An alternative is to look for the "Developers Stack" by Steve Drazga of ART* Incorporated, a newsletter-like stack that consolidates the documentation and examples for all these routines and others into a single, well indexed format.